Skip to content

feat(ddd): add Result.ok() void overload for command use cases#68

Merged
pourdaavar merged 2 commits into
mainfrom
feat/result-void
Jun 25, 2026
Merged

feat(ddd): add Result.ok() void overload for command use cases#68
pourdaavar merged 2 commits into
mainfrom
feat/result-void

Conversation

@pourdaavar

@pourdaavar pourdaavar commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add overloaded Result.ok() for no-value success (Ok<void>) in command use cases
  • Default Ok<T> and Result<T, E> type parameters to void and UseCaseError
  • Broaden flatMap to allow distinct error types in chained operations
  • Add runtime and type tests for Result.ok() without arguments

Test plan

  • pnpm --filter @rineex/ddd test -- src/shared/domain/__tests__/result.spec.ts
  • pnpm --filter @rineex/ddd test:types
  • pnpm --filter @rineex/ddd check-types

Support no-value success via overloaded Result.ok(), default void type
params on Ok/Result, and broaden flatMap error typing with tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2b3b6ac

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@rineex/ddd Minor
@rineex/auth-core Patch
@rineex/authentication-method-otp Patch
@rineex/authentication-method-passwordless Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pourdaavar pourdaavar self-assigned this Jun 25, 2026
@pourdaavar pourdaavar added the enhancement New feature or request label Jun 25, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@pourdaavar pourdaavar merged commit 4647008 into main Jun 25, 2026
5 checks passed
@pourdaavar pourdaavar mentioned this pull request Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant